<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的博客</title>
<style type="text/css">
.box1 {
	position: absolute;
	width: 15%;
	height: 300px;
	top: 200px;
	left: 50px;
	background-color: #FFFFCC;
	border: 1px solid #ccc;
}

.box2 {
	position: absolute;
	width: 60%;
	height: 1950px;
	top: 60px;
	left: 400px;
	border: 1px solid #ccc;
}

.hiding {
	position: relative;
	top: 1940px;
	left: 900px;
	background-color: #E0FFFF;
}

.box3 {
	position: absolute;
	width: 60%;
	height: 300px;
	top: 2050px;
	left: 400px;
	border: 1px solid #ccc;
	display: none;
}

.box4 {
	position: absolute;
	width: 100%;
	height: 20px;
	top: 2380px;
	background-color: #ccc;
}

a {
	text-decoration: none;
}
</style>
</head>
<body>
	<div style="float: right;">
		<a href="blog_body.html">首页</a>&nbsp;&nbsp;&nbsp; <a
			href="blog_login.html">退出</a>
	</div>
	<div class="box1">
		<center>
			<img src="" />
			<div id="name"></div>
		</center>
	</div>
	<center>
		<h1 style="color: #CC3333; font-family: 楷体">我的博客列表</h1>
	</center>
	<div style="background-color: #99FFCC;" id="contentview" class="box2"
		width="50%"></div>
	<div class="box3">
		<form id="write-form" method="post">
			<ul>
				<li>标&nbsp;&nbsp;&nbsp;&nbsp;题：<input type="text" name="title"
					style="width: 400px; height: 30px; font-size: 22px" /></li>
				<li>内&nbsp;&nbsp;&nbsp;&nbsp;容：<textarea id="editor"
						name="content" rows="10" cols="50"></textarea></li>
			</ul>
			<div style="text-align: center;">
				<button id="writeblog" type="submit">提交</button>
				<button type="reset">取消</button>
			</div>
		</form>
	</div>
	<button class="hiding" type="submit" style="color: #1E90FF;">写博客</button>
	<div class="box4" style="font-size: 微软雅黑;">
		<center>Copyright © 2015-2016 All Rights Reserved xx 版权所有</center>
	</div>


	<script type="text/javascript" src="/static/js/jquery.min.js"></script>
	<script type="text/javascript"
		src="/static/js/ueditor/ueditor.config.js"></script>
	<script type="text/javascript"
		src="/static/js/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript">
		var account;
		$(function() {
			$.get('/login', function(data) {
				$('#name').html(data.name);
				$('#name'),html(data.account);
				/* account = data.account; */
				$("img").attr("src", data.avt);
			});
		});
		$(function() {
			$('#writeblog').on(
					'click',
					function() {
						$.post('/blog_write', $('#write-form').serialize(),
								function(data) {
									alert(data);
									console.log(data);
								});
					});

			var ue = UE.getEditor('editor');
		});
		$(document).ready(function() {
			$(".hiding").click(function() {
				$(".box3").slideToggle(1000);
			});

		});
	</script>
</body>
</html>